<!DOCTYPE html>
<html>
<head>
    <title>订单管理:商城购买订单</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="!detail&&showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="2">
                    <i-input v-model="q.orderNo" @on-enter="query" placeholder="订单号"/>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.userPhone" @on-enter="query" placeholder="手机号"/>
                </i-col>
                <i-col span="4">
                    <!--<i-input v-model="q.merchantName" @on-enter="query" placeholder="商户名称"/>-->
                    <i-select  v-model="q.merchantId" placeholder="商户名称">
                        <i-option v-for="item in merchants" :value="item.merchantId">{{ item.merchantName }}</i-option>
                    </i-select>
                </i-col>
                <i-col span="2">
                    <i-select v-model="q.payStatus" placeholder="付款状态">
                        <i-option value="1">未支付</i-option>
                        <i-option value="2">已支付</i-option>
                    </i-select>
                </i-col>
                <i-col span="2">
                    <i-select v-model="q.payWay" placeholder="付款方式1微信2支付宝">
                        <i-option value="1">微信支付</i-option>
                        <i-option value="2">支付宝</i-option>
                    </i-select>
                </i-col>
                <i-col span="2">
                <i-select v-model="q.status" placeholder="订单状态">
                    <i-option value="1">未支付</i-option>
                    <i-option value="2">支付完成</i-option>
                    <i-option value="3">已取消</i-option>
                    <i-option value="4">已完成</i-option>
                    <i-option value="5">待发货</i-option>
                    <i-option value="6">已发货</i-option>
                    <i-option value="9">退款处理</i-option>
                    <i-option value="10">退款中</i-option>
                    <i-option value="11">退款完成</i-option>
                </i-select>
                </i-col>
                <i-col span="2">
                    <Date-picker type="datetime" placement="bottom-end"   v-model="q.start"  placeholder="开始时间"
                                 format="yyyy-MM-dd HH:mm:ss"></Date-picker>
                </i-col>
                <i-col span="2">
                    <Date-picker type="datetime" placement="bottom-end"   v-model="q.end"  placeholder="结束时间"
                                 format="yyyy-MM-dd HH:mm:ss"></Date-picker>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("order:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("order:info"))
                <i-button type="warning" @click="update">查看</i-button>
                #end
                #if($shiro.hasPermission("order:detail"))
                <i-button type="warning" @click="openDetail">详情</i-button>
                #end
                #if($shiro.hasPermission("order:update"))
                <i-button type="warning" @click="update">修改</i-button>
                #end
                #if($shiro.hasPermission("order:send"))
                <i-button type="warning" @click="sendGoods">发货</i-button>
                #end
                #if($shiro.hasPermission("order:print"))
                <i-button type="warning" @click="printDetail">打印</i-button>
                #end
                #if($shiro.hasPermission("order:export"))
                <i-button type="warning" @click="exportPro"><i class="fa fa-pencil-square-o"></i>&nbsp;导出</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <!--发货模块 开始-->
    <Card v-show="!showList&&!detail&!showadd&!showconfirm&!showselect">
        <p slot="title">{{title}}</p>
        <i-form :model="order" :label-width="100">
            <!--<Form-item label="快递公司" prop="shippingId">-->
                <!--<i-select v-model="order.shippingId" filterable>-->
                    <!--<i-option v-for="shipping in shippings" :value="shipping.id" :key="shipping.id">{{shipping.name}}-->
                    <!--</i-option>-->
                <!--</i-select>-->
            <!--</Form-item>-->
            <Form-item label="快递单号" prop="logisticsno">
                <i-input v-model="order.logisticsno" placeholder="快递单号"/>
            </Form-item>
            <Form-item label="物流名称" prop="name">
                <i-input v-model="logistics.name" placeholder="物流名称"/>
            </Form-item>
            <Form-item label="订单编号" prop="orderno">
                <i-input v-model="order.orderNo" placeholder="订单编号"/>
            </Form-item>
            <Form-item label="物流状态" prop="statu">
                <i-select v-model="logistics.statu" placeholder="物流状态">
                    <i-option :value="1">已发货</i-option>
                    <i-option :value="2">已收货</i-option>
                </i-select>
            </Form-item>
            <Form-item label="产品编号" prop="pid">
                <i-input v-model="order.productId" placeholder="产品编号"/>
            </Form-item>
            <Form-item label="产品名称" prop="pname">
                <i-input v-model="order.productName" placeholder="产品名称"/>
            </Form-item>
            <Form-item label="数量" prop="num">
                <i-input v-model="order.number" placeholder="数量"/>
            </Form-item>
            <Form-item label="用户编号" prop="userId">
                <i-input v-model="order.userId" placeholder="用户编号"/>
            </Form-item>
            <Form-item label="用户名" prop="userName">
                <i-input v-model="order.userName" placeholder="用户名"/>
            </Form-item>
            <Form-item label="手机" prop="phone">
                <i-input v-model="order.userPhone" placeholder="手机"/>
            </Form-item>
            <Form-item label="备注" prop="remark">
                <i-input v-model="order.remark" placeholder="备注" readonly/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="saveSend">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
            </Form-item>
        </i-form>
    </Card>


    <Card v-show="showadd">
        <p slot="title" style="height: auto">
            {{title}}
        </p>
        <i-form ref="formValidate" :model="order" :label-width="80">
            <Form-item label="订单号" prop="orderNo">
                <i-input v-model="order.orderNo" readonly/>
            </Form-item>
            <Form-item label="付款状态" prop="payStatus">
                <i-select v-model="order.payStatus" >
                    <i-option value="0" >未付款</i-option>
                    <i-option value="2">已付款</i-option>
                </i-select>
            </Form-item>
            <Form-item label="订单类型" prop="type">
                <Radio-group v-model="order.type">
                    <Radio label="1">
                        <span>价格单</span>
                    </Radio>
                    <Radio label="2">
                        <span>兑换单</span>
                    </Radio>
                    <Radio label="3">
                        <span>金额兑换单</span>
                    </Radio>
                    <Radio label="4">
                        <span>D-one产品</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="用户id"  prop="userId">
                <i-input v-model="order.userId"   readonly/>
            </Form-item>
            <Form-item label="用户名"  prop="userName">
                <i-input v-model="order.userName"   />
            </Form-item>
            <Form-item label="用户手机号"  prop="userPhone">
                <i-input v-model="order.userPhone"  />
            </Form-item>
            <Form-item label="产品编号"  prop="productId">
                <i-input v-model="order.productId"  />
            </Form-item>
            <Form-item label="产品名称"  prop="productName">
                <i-input v-model="order.productName"  />
            </Form-item>
            <Form-item label="产品图"  prop="productUrl">
                <i-input v-model="order.productUrl"  />
            </Form-item>
            <Form-item label="交易金额" prop="amount">
                <i-input v-model="order.amount" />
            </Form-item>
            <Form-item label="服务费" prop="rateValue">
                <i-input v-model="order.rateValue" />
            </Form-item>
            <Form-item label="实际支付" prop="realAmount">
                <i-input v-model="order.realAmount" />
            </Form-item>
            <Form-item label="收货人" prop="receiveUser">
                <i-input v-model="order.receiveUser"  />
            </Form-item>
            <Form-item label="联系电话" prop="receivePhone"  placeholder="联系电话">
                <i-input v-model="order.receivePhone" />
            </Form-item>
            <Form-item label="收货地址" prop="addressStr"  placeholder="收货地址">
                <i-input v-model="order.addressStr" />
            </Form-item>
            <Form-item label="付款时间" prop="payDate"  placeholder="付款时间">
                <Date-picker v-model="order.payDate" placeholder="付款时间" readonly/>
            </Form-item>
            <Form-item label="物流单号" prop="logisticsno" placeholder="物流单号">
                <i-input v-model="order.logisticsno" />
            </Form-item>
            <Form-item label="物流状态" prop="logisticsStatus" placeholder="物流状态">
                <i-input v-model="order.logisticsStatus" />
            </Form-item>
            <Form-item label="商家编号" prop="merchantId">
                <Input-number :min="1" :step="1" v-model="order.merchantId" placeholder="商家编号"
                              style="width: 188px;"/>
            </Form-item>
            <Form-item label="商家名称" prop="merchantName">
                <i-input v-model="order.merchantName" />
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="saveOrUpdate">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>


</div>
<script src="${rc.contextPath}/js/order/order.js?_${date.systemTime}"></script>
</body>
</html>